if(COMMAND cmake_policy)
    cmake_policy(SET CMP0003 NEW)
    endif(COMMAND cmake_policy)

    cmake_policy(SET CMP0015 NEW)

    ADD_SUBDIRECTORY(GUI)
    ADD_SUBDIRECTORY(Frame)
    ADD_SUBDIRECTORY(IO)
    ADD_SUBDIRECTORY(Process)

    FIND_PACKAGE(OpenCV REQUIRED)

    SET(MAIN_SRC main.cpp log.cpp image.cpp config.cpp test.cpp)

    LINK_DIRECTORIES(../lib/)
    ADD_EXECUTABLE(main ${MAIN_SRC})
    ADD_DEPENDENCIES(main GUI Frame Model Process_static)
    TARGET_LINK_LIBRARIES(main ${OpenCV_LIBS} GUI Frame Model Process_static)

    find_path(EIGEN_INCLUDE_PATH "Eigen/Core" PATHS "/usr/local/include/eigen2" "/opt/include/eigen2" "/usr/include/eigen2" "eigen2S"
              DOC "The path to Eigen2/Eigen3 headers")
    if(EIGEN_INCLUDE_PATH)
        INCLUDE_DIRECTORIES(TRACK ${EIGEN_INCLUDE_PATH})
        endif()
